<?php
class Sc_Comment extends Sc_Domain
{
	protected $id;
	protected $vn;
	protected $jp;
	protected $userid;
	protected $datecreated;
	protected $dateupdated;
	
	public function __construct($data = null)
    {
        if ($data != null) {
            if ($data instanceof Zend_Db_Table_Row_Abstract
                || is_array($data) == TRUE) {
                $this->id          = $this->getData($data, 'Id');
                $this->vn  = $this->getData($data, 'VN');
                $this->jp = $this->getData($data, 'JP');
                $this->userid = $this->getData($data, 'UserId');
                $this->datecreated = $this->getData($data, 'DateCreated');
                $this->dateupdated = $this->getData($data, 'DateUpdated');
            }
        }
    }

    public function toArray()
    {
        $data = array(
                'Id'           => $this->id,
                'VN'    	   => $this->vn,
                'JP'           => $this->jp,
        		'UserId'       => $this->userid,
        		'DateUpdated'  => new Zend_Db_Expr('CURRENT_TIMESTAMP')
        );
        return $data;
    }
}